﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using DAO;

namespace BUS
{
    public class BUS_DANGNHAP
    {
        QLTTTHDataContext QLTTTH = new QLTTTHDataContext();
        public bool KiemTraDangNhap(string tendangnhap, string matkhau)
        {
            var dangnhap = (from kt in QLTTTH.NHANVIENs
                              where kt.TENDANGNHAP == tendangnhap && kt.MATKHAU == matkhau 
                              select kt).Count();
            if (dangnhap == 1)
                return true;
            else
                return false;
        }

  
    }
}
